﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Xml.Serialization;
using cndp.Model.IModel;

namespace cndp.Model
{
    /// <summary>
    /// JumpCodesAndStyle - Denna klass har hand om en persons hoppkoder och stilar inför en viss tävling
    /// </summary>
    [Serializable]
    public class JumpCodesAndStyle : IJumpCodesAndStyle
    {
        #region Variables/Properties
        [XmlElement("JUMPCODE")]
        public int Jumpcode { get; set; }
        [XmlElement("STYLE")]
        public string Style { get; set; }

        #endregion

        #region Constructor

        public JumpCodesAndStyle(int jumpcode,string style)
        {
            Jumpcode = jumpcode;
            Style = style;

        }

        public JumpCodesAndStyle()
        {
        }


        #endregion

        public override bool Equals(object obj)
        {
            if (obj == null) return false;
            var objAsJumpCodesAndStyle = obj as JumpCodesAndStyle;
            if (objAsJumpCodesAndStyle == null) return false;
            return Equals(objAsJumpCodesAndStyle);
        }

        public bool Equals(JumpCodesAndStyle other)
        {
            if (other == null) return false;
            return (other.Jumpcode == Jumpcode && other.Style == Style);
        }
    }
}
